<?php
/**
 * +----------------------------------------------------------------------
 * | Author: 罗极
 * +----------------------------------------------------------------------
 * | Description: Router.php
 * +----------------------------------------------------------------------
 * | User: Administrator Date: 8/20/ 0020 Time: 14:54
 * +----------------------------------------------------------------------
 */

use Framework\Router\Router;


Router::get('/a','Index@Index#a', ['id' => '/[a-z]/'], function() {
    echo 'hello world';
});
Router::get('b', 'AaA@BbB#Sas');


Router::group('/c', [
    [
        'route' => 'a',
        'link'  => 'Index@C#a',
        'pattern' => ['id' => '/[0-9]/'],
        'callback' => function() {
            echo '/c/a';
        }
    ],
    [
        'route' => 'b',
        'link'  => 'Index@C#b',
        'pattern' => [],
        'callback' => function() {
            echo '/c/b';
        }
    ]
], 'GET');

